<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>后台管理主页</title>
		<link rel="stylesheet" type="text/css" href="/css/manager.css" />
		<script src="/js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="/js/manager_siderlist.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			$(document).ready(function() {
				$("#categorylist").change(function() {
					var selected_val = $(this).find("option:selected").val();
					$("input#up_id").val(selected_val);
				});

				$("#add_form").submit(function() {
					var cate_name = $("#catename").val();
					if(cate_name == null || cate_name == "") {
						alert('分类内容不能为空');
						return false;
					}
				});
			});
		</script>
	</head>

	<body>
		<div id="container">
			<!--顶部-->
			<% include ../template/manager_header.html %>
			<!--内容-->
			<div id="content">
				<div class="top_nav">
					<a href="#">管理首页</a>>>
					<a href="#">XX管理</a>>>
					<a href="#">XX页面</a>
				</div>
				<div class="content_panel clearfix">
					<!--侧边管理链接-->
					<% include ../template/manager_siderlist.html %>
					<div class="panel_right fr">
						<!--分类管理-->
						<div class="category_list">
							<form id="add_form" action="/manager/add_cate" method="post">
								<table id="list_style" class="catelist">
									<thead>
										<tr>
											<th colspan="2">分类管理</th>
										</tr>
									</thead>
									<tbody>
										<tr>
											<td class="left">选择添加分类节点：</td>
											<td>
												<select id="categorylist" name="category">
													<%for(var i=0;i<categorylist.length;i++){%>
													<option value="<%=categorylist[i].category_Id%>">
														<%=categorylist[i].category_name.trim()%>
													</option>
													<%}%>
												</select>
											</td>
										</tr>
										<tr>
											<td class="left">添加分类：</td>
											<td>
												<input type="hidden" id="up_id" name="up_id" value="0" />
												<input type="text" id="catename" name="catename" value="" /> </td>
										</tr>
										<tr>
											<td colspan="2" class="submit_btn"><input type="submit" id="" value="提交" name="" /></td>
										</tr>
									</tbody>
									<tfoot>
										<tr>
											<td colspan="2" class="h30">
											</td>
										</tr>
									</tfoot>
								</table>
							</form>
						</div>
					</div>
				</div>
			</div>
			<!--底部-->
			<% include ../template/manager_footer.html %>
		</div>

	</body>

</html>